<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul li{
            list-style: none;
        }
        .item{
            width: 100px;
            height: 40px;
            background: pink;
            border: 1px solid rgb(247,102,57);
            text-align: center;
            line-height: 40px;
            float: both;
        }
        /* 1 */
        /* .clearfix{
            clear: left;
        } */
        /* 2 */
        .list::after{
            content: '';
            display: block;
            clear: both;
        }
    </style>
</head>
<body>
    <ul class="list">
        <li class="item">1</li>
        <li class="item">2</li>
        <li class="item">3</li>
        <li class="item">4</li>
        <li class="item">5</li>
        <li class="item clearfix"></li>
        <!-- <li class="clearfix"></li> -->
    </ul>
    <div class="test">hello world</div>
</body>
</html>